package com.leyou.item;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FallbackController {

    @GetMapping(value = "/hystrix/fallback")//网关拦截触发的
    public ResponseEntity<String> fallBackController(){ //此类可以返回状态码和内容
        return ResponseEntity.status(HttpStatus.GATEWAY_TIMEOUT).body("此熔断页面请求超时！");
    }

}
